window.onload = function(){
	//轮播图
	var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        slidesPerView: 1,
        paginationClickable: true,
        spaceBetween: 30,
        loop: true
   });    
}
//客服
$(function(){
	$('#kefu_close').click(function(){
		$('#kefu-box').hide();
		$('#kefu_start').show();
	})
});
$(function(){
	$('#kefu_start').click(function(){
		$('#kefu-box').show();
		$('#kefu_start').hide();
	})
});


//底部侧边栏
$(document).ready(function() {
				$("#leftsead a").hover(function() {
					if($(this).prop("className") == "youhui") {
						$(this).children("img.hides").show();
					} else {
						$(this).children("div.hides").show();
						$(this).children("img.shows").hide();
						$(this).children("div.hides").animate({
							marginRight: '0px'
						}, '0');
					}
				}, function() {
					if($(this).prop("className") == "youhui") {
						$(this).children("img.hides").hide();
					} else {
						$(this).children("div.hides").animate({
							marginRight: '-163px'
						}, 0, function() {
							$(this).hide();
							$(this).next("img.shows").show();
						});
					}
				});

				$("#top_btn").click(function() {
					if(scroll == "off") return;
					$("html,body").animate({
						scrollTop: 0
					}, 600);
				});


				$(".youhui").mouseover(function() {
					$(this).children(".2wm").show();
				})
				$(".youhui").mouseout(function() {
					$(this).children(".2wm").hide();
				});

			});